<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<!-- 绘制一个长宽为200px，边框为10px红色，填充颜色为绿色的，且中间部分矩形区域透明的矩形-->
<body>
<canvas width="600" height="600" id="can">您的浏览器不支持画布</canvas>
<script type="text/javascript">
    var can=document.getElementById("can");
    var pen=can.getContext("2d");
    pen.strokeStyle="green";
    pen.lineWidth="10";
    pen.strokeRect(100,100,200,200);
</script>
</body>
</html>